Gateway device and method for establishing a voice over internet protocol communication

ABSTRACT

A gateway device and method for establishing Voice over Internet Protocol (VoIP) communication includes setting coding methods of the VoIP, and setting quality of service (QoS) parameters corresponding to each coding method. In response to dialing a VoIP phone call from a local user terminal, a Session Initiation Protocol (SIP) session is initiated to determine a coding method. QoS parameters corresponding to the determined coding method are parsed to generate a request packet. The request packet is sent to base station to request for establishing a VoIP phone call. The VoIP phone call is established between the local user terminal and a remote user terminal by sending the VoIP packets through the base station to the remote user terminal.

BACKGROUND

1. Technical Field

Embodiments of the present disclosure relate to communicationtechnology, and more particularly to a gateway device and method forestablishing Voice over Internet Protocol (VoIP) communication using thegateway device.

2. Description of Related Art

People may communicate with each other by dialing a phone call over anetwork, such as the Internet. However, an unstable network mayinfluence communication quality.

Furthermore, before dialing the phone call over the Internet, peoplehave to login to a network platform provided by a telecommunicationcompany and download a software program. The software program allowstelephone calls to be made over the Internet using a general purposecomputer. Thus, a gateway device and method for ensuring thecommunication quality of the phone call over the network are desired.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of one embodiment of a gateway device incommunication with a local user terminal and base station.

FIG. 2 is a schematic diagram of one embodiment of the gateway device ofFIG. 1.

FIG. 3 is a flowchart of one embodiment of a method for establishing aVoIP communication using the gateway device of FIG. 1.

DETAILED DESCRIPTION

The disclosure is illustrated by way of example and not by way oflimitation in the figures of the accompanying drawings in which likereferences indicate similar elements. It should be noted that referencesto “an” or “one” embodiment in this disclosure are not necessarily tothe same embodiment, and such references mean at least one.

In general, the word “module,” as used herein, refers to logic embodiedin hardware or firmware, or to a collection of software instructions,written in a programming language, such as, Java, C, or Assembly, forexample. One or more software instructions in the modules may beembedded in firmware, such as an erasable programmable read only memory(EPROM). It will be appreciated that modules may comprise connectedlogic units, such as gates and flip-flops, and may comprise programmableunits, such as programmable gate arrays or processors. The modulesdescribed herein may be implemented as either software and/or hardwaremodules and may be stored in any type of computer-readable medium orother computer storage system.

FIG. 1 is a block diagram of one embodiment of a gateway device 2 incommunication with a local user terminal 1 and a base station (only oneshown) 3. In some embodiments, the gateway device 2 may be used to helpthe local user terminal 1 to establish a communication with a remoteuser terminal 6 over a network via the base station 3. The communicationmay be a Voice over Internet Protocol (VoIP) communication, for example.The network may be the Worldwide Interoperability for Microwave Access(WIMAX), the second-generation (2G), or the third-generation (3G), orany other kind of communication network. Detailed descriptions of thegateway device 2 are provided below. In some embodiments, the basestation 3 is in a wireless telephone system, which may be provided by atelecommunication company. More base stations are included in thewireless telephone system, for simplification, only one base station 3is used to describe the disclosure.

In some embodiments, the local user terminal 1 may send a request packetto the base station 3 through the gateway 2, for requesting acommunication with the remote user terminal 6. The base station 3 areconnected to a server 4 of the wireless telephone system of thetelecommunication company. The server 4 may process the request packettransmitted by the base station 3, and send a response packet to thegateway device 2 through the base station 3. The gateway 2 may transmitdata packets including voice data of a user of the local user terminal 1to the remote user terminal 6 through the base station 3 according tothe response packet. Therefore, the communication between the local userterminal 1 and the remote user terminal 6 is established. In otherembodiments, the remote user terminal 6 also may request to establishthe communication with the local user terminal 1 according to abovementioned procedure.

The local user terminal 1 and the remote user terminal 6 may be acomputer, a mobile phone, a personal digital assistant, or any otherkind of electronic device. As shown in FIG. 1, the local user terminal 1has a VoIP component 10, and the remote user terminal 6 has a VoIPcomponent 60. In some embodiments, the VoIP components 10 and 60 may bea program to generate VoIP packets according to users' voice data. Thelocal user terminal 1 and the remote user terminal 6 may complete thecommunication by transmitting the VoIP packets to each other. Detaileddescriptions are provided below.

FIG. 2 is a block diagram of one embodiment of the gateway device 2. Thegateway device 2 includes at least one processor 20 and a storage system21. The at least one processor 20 executes one or more computerizedoperations of the gateway device 2 and other applications, to providefunctions of the gateway device 2. The storage system 21 stores one ormore programs, such as programs of the operating system, otherapplications of the gateway device 2, and various kinds of data, such asa contact list, messages, for example. In some embodiments, the storagesystem 21 may include a memory of the gateway device 2, such as a harddisk, and/or an external storage card, such as a memory stick, a smartmedia card, a compact flash card, or any other type of memory card.

The gateway device 1 further includes a setting module 22, a loginmodule 23, a Session Initiation Protocol (SIP) module 24, a detectionmodule 25, a parameter parsing module 26, and a communication module 27.The modules 22-27 may include computerized codes in the form of one ormore programs that are stored in the storage system 21. The computerizedcodes include instructions that are executed by the at least oneprocessor 20 to provide functions for modules 22-27. Details of thesefunctions will be provided below.

The setting module 22 sets a plurality of coding methods of the VoIP,and sets quality of service (QoS) parameters corresponding to each ofthe coding methods. In some embodiments, the coding method of the VoIPmay be G729, G723, PCMU, PCMA, or G726-32, for example. The QoSparameters refer to a control mechanism to provide different priority todifferent applications, users, or data flows, or to guarantee a certainlevel of performance to a data flow. The QoS parameters guarantees areimportant if the network capacity is insufficient, especially forreal-time streaming multimedia applications, such as Voice over InternetProtocol (VoIP), online games. The QoS parameters may include, but arenot limited to an interval (referred to as “ptime”) to transmit the datapackets, bits of each data packet, bits of the data packets thattransmitted at each interval (referred to as “vif'), a length of aheader (referred to as “header_len”), bandwidth, for example. The QoSparameters may be modified, newly added, or may be canceled by the useraccording to actual requirements.

The setting module 22 also stores the coding methods and correspondingQoS parameters in the storage system 21.

The login module 23 logs on a VoIP account if the gateway device 2 ispowered on. If no VoIP account has been registered, the login module 23may connect to the server 4 of the wireless telephone system through thebase station 3, and register the VoIP account on the server 4automatically.

The login module 23 also provides a phone call webpage to the local userterminal 1, the phone call webpage may include, but is not limited to acontact list, a plug-in program of a VoIP component, and a dialingbutton. The plug-in program of a VoIP component may be downloaded to thelocal user terminal 1 or the remote user terminal 6 to install the VoIPcomponent therein. The contact list shows various information ofcontacts, such as an address of the remote user terminal 6, VoIP phonenumbers of different contacts, for example.

In response to opening the phone call webpage, the login module 23further checks the local user terminal 1, and determines if the localuser terminal 1 has installed the VoIP component. If the local userterminal has not installed the VoIP component, the login module 23downloads the plug-in program of the VoIP component from the phone callwebpage to the local user terminal 1.

The user of the local user terminal 1 may view the phone call webpagethrough a display of the local user terminal 1 to browse the contactlist, and dials a phone call of a selected contact by clicking thedialing button. Through the phone call webpage and the VoIP components,the user may dial VoIP phone calls easily without downloading asoftphone program from the telecommunication company.

As mentioned above, the user of the local user terminal 1 may dial theVoIP phone call of the remote user terminal 6 through the phone callwebpage. The Session Initiation Protocol (SIP) module 24 initiates a SIPsession between the local user terminal 1 and the remote user terminal6, to determine a coding method that both of the local user terminal 1and the remote user terminal 6 have. The determined coding method isused to transmit the VoIP packets between the local user terminal 1 andthe remote user terminal 6.

For example, the local user terminal 1 supports coding methods of G729,G723, and PCMU, and the remote user terminal 6 supports coding methodsof PCMU, PCMA, and G726-32. According to the SIP session, the codingmethod of PCMU is determined. In some embodiments, the SIP session mayinclude following steps. A caller (e.g., the local user terminal 1)acquires an address of a callee (e.g., the remote user terminal 6), theaddress may be “username@domain name.” A domain name system (DNS)transforms the address of the callee to be an IP address. The callersends a request of “SIP INVITE” to the callee according to the IPaddress of the callee. The callee answers a response message of “SIP 200OK”. The caller sends a message of “ACK” to the callee, to complete theSIP session successfully.

In some embodiments, if the local user terminal and the remote userterminal have a same coding method, the SIP module 24 determines thatthe SIP session is successful, and generates the VoIP packets accordingto voice data of the user using the VoIP component. The VoIP packets aresent to the gateway device 2.

The detection module 25 detects the VoIP packets sent by the local userterminal 1. The VoIP packets may include Real-time Transport Protocol(RTP) data, and the RTP data may include timestamp information, forexample.

The parameter parsing module 26 determines corresponding QoS parametersaccording to the determined coding method. As mentioned above, the QoSparameters may include an interval (referred to as “ptime”) to transmitthe data packets, bits of each data packet, bits of the data packetsthat transmitted at each interval (referred to as “vif”), a length of aheader (referred to as “header_len”), bandwidth. For example, it isassumed that the determined coding method is PCMU. The “ptime” is 20 ms,which represents that one of the VoIP packets is transmitted at each 20ms. Bits of each VoIP packet is 64 bits, and “vif'=“ptime”*64=20*64=1280bits. That is, 1280 bits may be transmitted at each 20 ms. The bandwidthmay be calculated according to a following formula of:

Bandwidth=8*(vif/8+header_len)*(1000/ptime)=8*(1280/8+40)*50=80000(bits/sec).

The parameter parsing module 26 parses the determined QoS parameters togenerate a request packet according to a network protocol of the networkbetween the gateway 2 and the base station 3. The network protocol maybe WiMAX, WCDMA, or CDMA2000.

The communication module 27 sends the request packet to the base station3 to request for establishing the VoIP phone call between the local userterminal 1 and the remote user terminal 6, and receives a responsepacket from the base station. The communication module 27 determines ifthe request succeeds according to the response packet. For example, therequest packet includes a requested bandwidth. The communication module27 may determine if the server 4 can allocate the requested bandwidth tothe local user terminal 1 according to the response packet.

If the request succeeds, the communication module 27 inputs the RTP datainto an Extended real-time Polling Service (ertPS) queue, and downloadsan uplink schedule from the base station 3 to the gateway device 2. Insome embodiments, the ertPS is a type of service that is defined by theIEEE 802.16 WiMAX. The ertPS is designed to work under conditions inwhich the data rate is in constant change. The uplink schedule liststime sequences to transmit the VoIP packets.

The communication module 27 sends the VoIP packets to the remote userterminal 6 according to the uplink schedule, to establish the VoIP phonecall between the local user terminal 1 and the remote user terminal 6successfully.

FIG. 3 is a flowchart of one embodiment of a method for establishing aVoIP communication using the gateway device 2 of FIG. 1. Depending onthe embodiment, additional blocks may be added, others removed, and theordering of the blocks may be replaced.

In block S2, the setting module 22 sets a plurality of coding methods ofthe VoIP, and sets QoS parameters corresponding to each of the codingmethods. As mentioned above, the coding method of the VoIP may be G729,G723, PCMU, PCMA, or G726-32, for example.

In block S4, the login module 23 logs on a VoIP account if the gatewaydevice 2 is powered on, and provides a phone call webpage to the localuser terminal 1. The phone call webpage may include a contact list, aplug-in program of a VoIP component, and a dialing button.

In block S6, in response to dialing a VoIP phone call of the remote userterminal 6, the SIP module 24 initiates a SIP session between the localuser terminal 1 and the remote user terminal 6, to determine a codingmethod that both of the local user terminal 1 and the remote userterminal 6 have. The SIP module 24 further determines that the SIPsession is successful, and generates the VoIP packets according to voicedata of the user using the VoIP component.

In block S8, the detection module 25 detects the VoIP packets. The VoIPpackets may include RTP data, and the RTP data may include timestampinformation, for example.

In block S10, the parameter parsing module 26 determines correspondingQoS parameters according to the determined coding method, and parses thedetermined QoS parameters to generate a request packet according to anetwork protocol of the network between the gateway 2 and the basestation 3.

If, in block S12, the communication module 27 sends the request packetto the base station 3 to request for establishing the VoIP phone callbetween the local user terminal 1 and the remote user terminal 6, andreceives a response packet from the base station.

In block S14, the communication module 27 determines if the requestsucceeds according to the response packet. If the request fails, theprocedure returns to block S12.

If the request succeeds, in block S16, the communication module 27inputs the RTP data into an ertPS queue.

In block S18, the communication module 27 downloads an uplink schedulefrom the base station 3 to the gateway device 2. The uplink schedulelists time sequences to transmit the VoIP packets.

In block S20, the communication module 27 sends the VoIP packets to theremote user terminal 6 according to the uplink schedule, to establishthe VoIP phone call between the local user terminal 1 and the remoteuser terminal 6 successfully.

Although certain embodiments of the present disclosure have beenspecifically described, the present disclosure is not to be construed asbeing limited thereto. Various changes or modifications may be made tothe present disclosure without departing from the scope and spirit ofthe present disclosure.

What is claimed is:
 1. A method for establishing a Voice over Internet Protocol (VoIP) communication using a gateway device, the gateway device in communication with a local user terminal and base station of a wireless telephone system, the method comprising: setting a plurality of coding methods of the VoIP, and setting quality of service (QoS) parameters corresponding to each of the plurality of coding methods; in response to establishing a VoIP phone call with a remote user terminal by the local user terminal, initiating a Session Initiation Protocol (SIP) session between the local user terminal and the remote user terminal to determine a coding method; detecting VoIP packets generated by the local user terminal under the condition that the SIP session is initiated successfully; determining corresponding QoS parameters according to the determined coding method, and parsing the determined QoS parameters to generate a request packet according to a network protocol of the network between the gateway device and the base station; sending the request packet to the base station to request an establishment of the VoIP phone call; and establishing the VoIP phone call between the local user terminal and the remote user terminal by sending the VoIP packets from the base station to the remote user terminal under the condition that the request succeeds.
 2. The method according to claim 1, further comprising: logging on a VoIP account if the gateway device is powered on; and providing a phone call webpage to the local user terminal, the phone call webpage comprising a contact list, a plug-in program of a VoIP component, and a dialing button.
 3. The method according to claim 2, further comprising: in response to opening the phone call webpage, determining if the local user terminal has been installed with the VoIP component; and downloading the plug-in program of the VoIP component to the local user terminal if the local user terminal has not been installed with the VoIP component, to generate the VoIP packets according to voice data of a user.
 4. The method according to claim 1, wherein the SIP session is determined to be initiated successfully if the local user terminal and the remote user terminal have a same coding method.
 5. The method according to claim 1, wherein the VoIP packets comprise Real-time Transport Protocol (RTP) data.
 6. The method according to claim 5, wherein the step of establishing the VoIP phone call between the local user terminal and the remote user terminal by sending the VoIP packets from the base station to the remote user terminal under the condition that the request succeeds comprises: determining that the request succeeds according to a response packet sent from the base station to the local user terminal; inputting the RTP data of the VoIP packets into an Extended real-time Polling Service (ertPS) queue, and downloading an uplink schedule from the base station to the gateway device; and sending the VoIP packets to the remote user terminal according to the uplink schedule.
 7. A gateway device for establishing a Voice over Internet Protocol (VoIP) communication, the gateway device in communication with a local user terminal and base station of a wireless telephone system, the gateway device comprising: a storage system; at least one processor; and one or more programs stored in the storage system and being executable by the at least one processor, the one or more programs comprising: a setting module operable to set a plurality of coding methods of the VoIP, and set quality of service (QoS) parameters corresponding to each of the plurality of coding methods; a Session Initiation Protocol (SIP) module operable to initiate a SIP session between the local user terminal and the remote user terminal to determine a coding method, in response to establishing a VoIP phone call with a remote user terminal by the local user terminal; a detection module operable to detect VoIP packets generated by the local user terminal under the condition that the SIP session is initiated successfully; a parameter parsing module operable to determine corresponding QoS parameters according to the determined coding method, and parse the determined QoS parameters to generate a request packet according to a network protocol of the network between the gateway device and the base station; and a communication module operable to send the request packet to the base station to request for an establishment of the VoIP phone call, and establishing the VoIP phone call between the local user terminal and the remote user terminal by sending the VoIP packets from the base station to the remote user terminal under the condition that the request succeeds.
 8. The gateway device according to claim 7, wherein the one or more programs further comprises a login module operable to log on a VoIP account if the gateway device is powered on, and provide a phone call webpage to the local user terminal, the phone call webpage comprising a contact list, a plug-in program of a VoIP component, and a dialing button.
 9. The gateway device according to claim 8, wherein the login module is further operable to determine if the local user terminal has been installed with the VoIP component in response to opening the phone call webpage, and download the plug-in program of the VoIP component to the local user terminal if the local user terminal has not been installed with the VoIP component, to generate the VoIP packets according to voice data of a user.
 10. The gateway device according to claim 7, wherein the SIP module is further operable to determine that the SIP session is initiated successfully if the local user terminal and the remote user terminal have a same coding method.
 11. The gateway device according to claim 7, wherein the VoIP packets comprise Real-time Transport Protocol (RTP) data.
 12. The gateway device according to claim 11, wherein the communication module is further operable to: determine that the request succeeds according to a response packet sent from the base station to the local user terminal; input the RTP data of the VoIP packets into an Extended real-time Polling Service (ertPS) queue, and download an uplink schedule from the base station to the gateway device; and send the VoIP packets to the remote user terminal according to the uplink schedule.
 13. A storage medium storing a set of instructions, the set of instructions capable of being executed by a processor to perform a method for establishing a Voice over Internet Protocol (VoIP) communication using a gateway device, the gateway device in communication with a local user terminal and base station of a wireless telephone system, the method comprising setting a plurality of coding methods of the VoIP, and setting quality of service (QoS) parameters corresponding to each of the plurality of coding methods; in response to establishing a VoIP phone call with a remote user terminal by the local user terminal, initiating a Session Initiation Protocol (SIP) session between the local user terminal and the remote user terminal to determine a coding method; detecting VoIP packets generated by the local user terminal under the condition that the SIP session is initiated successfully; determining corresponding QoS parameters according to the determined coding method, and parsing the determined QoS parameters to generate a request packet according to a network protocol of the network between the gateway device and the base station; sending the request packet to the base station to request for an establishment of the VoIP phone call; and establishing the VoIP phone call between the local user terminal and the remote user terminal by sending the VoIP packets from the base station to the remote user terminal under the condition that the request succeeds.
 14. The storage medium as claimed in claim 13, wherein the method further comprises: logging on a VoIP account if the gateway device is powered on; and providing a phone call webpage to the local user terminal, the phone call webpage comprising a contact list, a plug-in program of a VoIP component, and a dialing button.
 15. The storage medium as claimed in claim 14, wherein the method further comprises: in response to opening the phone call webpage, determining if the local user terminal has been installed with the VoIP component; and downloading the plug-in program of the VoIP component to the local user terminal if the local user terminal has not been installed with the VoIP component, to generate the VoIP packets according to voice data of a user.
 16. The storage medium as claimed in claim 13, wherein the SIP session is determined to be initiated successfully if the local user terminal and the remote user terminal have a same coding method.
 17. The storage medium as claimed in claim 13, wherein the VoIP packets comprise Real-time Transport Protocol (RTP) data.
 18. The storage medium as claimed in claim 17, wherein the step of establishing the VoIP phone call between the local user terminal and the remote user terminal by sending the VoIP packets from the base station to the remote user terminal under the condition that the request succeeds comprises: determining that the request succeeds according to a response packet sent from the base station to the local user terminal; inputting the RTP data of the VoIP packets into an Extended real-time Polling Service (ertPS) queue, and downloading an uplink schedule from the base station to the gateway device; and sending the VoIP packets to the remote user terminal according to the uplink schedule. 